//
//  PhoneNumber.h
//  Phone
//
//  Created by ideveloper on 2024/6/25.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface PhoneNumber : NSObject

@property (nonatomic, strong) NSString *datFile;
@property (nonatomic, strong) NSData *buf;
@property (nonatomic, assign) int version;
@property (nonatomic, assign) int firstPhoneRecordOffset;
@property (nonatomic, assign) int phoneRecordCount;
@property (nonatomic, assign) int headFmtLength;
@property (nonatomic, assign) int phoneFmtLength;

- (instancetype)initWithDatFile:(NSString *)datFile;
- (void)getPhoneDatMsg;
- (NSDictionary *)find:(NSString *)phoneNum;
+ (NSString *)humanPhoneInfo:(NSDictionary *)phoneInfo;
- (void)test;

@end

NS_ASSUME_NONNULL_END
